ASensorEventQueue_getEvents

Retrieve pending events in sensor event queue

Retrieve next available events from the queue to a specified event array.

\param queue {@link ASensorEventQueue} to get events from \param events pointer to an array of {@link ASensorEvents}. \param count max number of event that can be filled into array event. \return number of events returned on success; negative error code when no events are pending or an error has occurred.

extern (C) nothrow @nogc
ssize_t
ASensorEventQueue_getEvents
(
,
ASensorEvent* events
,
size_t count
)

Examples

ASensorEvent event; ssize_t numEvent = ASensorEventQueue_getEvents(queue, &event, 1);

ASensorEvent eventBuffer[8]; ssize_t numEvent = ASensorEventQueue_getEvents(queue, eventBuffer, 8);

Meta